package com.kylin.function;

import java.util.ArrayList;
import java.util.function.Function;

//函数型接口
public class Demo01 {

    public static void main(String[] args) {


        Function<String,String> function = new Function<String, String>() {
            @Override
            public String apply(String s) {
                return s;
            }
        };

        System.out.println(function.apply("test"));

        Function function1 = (str)->{return str;};
        System.out.println(function1.apply("lambda"));
    }
}
